package transaction.lcn.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import transaction.lcn.common.entity.Result;
import transaction.lcn.common.tcc.WalletPayRequestVO;
import transaction.lcn.common.tcc.WalletPayResponseVO;

@FeignClient(name = "lcn-account")
public interface AccountFeign {

    @GetMapping("/lcn/account/debit")
    Result debit(@RequestParam("userId") String userId, @RequestParam("orderMoney") Integer orderMoney);

    @PostMapping("/lcn/account/debitTcc")
    WalletPayResponseVO debitTcc(@RequestBody WalletPayRequestVO request);

}
